package test.testcase.dao;

import test.utils.JsonResult;
import test.utils.Mysql;

public class AssertDao {
	
	public static JsonResult addModelAssert(String modelid, String stepid, String rule) {
		return Mysql.excute("insert into assert (modelid,modelstepid,expression) values("+modelid+","+stepid+",'"+rule+"')");
	}
	
	public static JsonResult addTestCaseAssert(String caseid, String stepid, String rule) {
		return Mysql.excute("insert into assert (caseid,stepid,expression) values("+caseid+","+stepid+",'"+rule+"')");
	}
	
	public static void delAssert(String stepid) {
		Mysql.excute("delete from assert where modelstepid="+stepid);
	}
	
	public static void delTestStepAssert(String stepid) {
		Mysql.excute("delete from assert where stepid="+stepid);
	}
	
	public static void delAssertByCaseId(String caseid) {
		Mysql.excute("delete from assert where caseid="+caseid);
	}

}
